﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WindowsFormApplication.FormCategory;
using WindowsFormApplication.FormCategoryTree;
using WindowsFormApplication.FormCategoryTreeView;

namespace WindowsFormApplication
{
    public partial class frmMain : Form
    {
        private void ShowNewForm(Form frmChild)
        {
            frmChild.MdiParent = this;
            frmChild.Show();
        }

        public frmMain()
        {
            InitializeComponent();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {

        }

        private void toolbarsManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
                case "mnuDistrict":
                    frmDistrictList frmDistrict = new frmDistrictList();
                    ShowNewForm(frmDistrict);
                    break;
                case "mnuCurrency":
                    frmCurrencyList frmCurrency = new frmCurrencyList();
                    ShowNewForm(frmCurrency);
                    break;
                case "mnuCurrencyRate":
                    frmCurrencyRateList frmCurrencyRate = new frmCurrencyRateList();
                    ShowNewForm(frmCurrencyRate);
                    break;
                case "mnuUnit":
                    frmUnitList frmUnit = new frmUnitList();
                    ShowNewForm(frmUnit);
                    break;
                case "mnuStock":
                    frmStockList frmStock = new frmStockList();
                    ShowNewForm(frmStock);
                    break;
                case "mnuCountryRegion":
                    frmCountryRegionList frmCountryRegion = new frmCountryRegionList();
                    ShowNewForm(frmCountryRegion);
                    break;
                case "mnuProvince":
                    frmProvinceList frmProvince = new frmProvinceList();
                    ShowNewForm(frmProvince);
                    break;
                case "mnuVendorCategory":
                    frmVendorCategoryList frmVendorCategory = new frmVendorCategoryList();
                    ShowNewForm(frmVendorCategory);
                    break;
                case "mnuVendor":
                    frmVendorList frmfrmVendor = new frmVendorList();
                    ShowNewForm(frmfrmVendor);
                    break;
                case "mnuMaterialCategory":
                    frmMaterialCategoryList frmMaterialCategory = new frmMaterialCategoryList();
                    ShowNewForm(frmMaterialCategory);
                    break;
                case "mnuMaterial":
                    frmMaterialList frmMaterial = new frmMaterialList();
                    ShowNewForm(frmMaterial);
                    break;
                case "mnuRestaurant":
                    frmRestaurantList frmRestaurant = new frmRestaurantList();
                    ShowNewForm(frmRestaurant);
                    break;
                case "mnuRestaurantArea":
                    frmRestaurantAreaList frmRestaurantArea = new frmRestaurantAreaList();
                    ShowNewForm(frmRestaurantArea);
                    break;
                case "mnuRestaurantTable":
                    frmRestaurantTableList frmRestaurantTable = new frmRestaurantTableList();
                    ShowNewForm(frmRestaurantTable);
                    break;
                case "mnuMenuCategory":
                    frmRestaurantMenuCategoryList frmRestaurantMenuCategory = new frmRestaurantMenuCategoryList();
                    ShowNewForm(frmRestaurantMenuCategory);
                    break;
                case "mnuMenu":
                    frmRestaurantMenuList frmRestaurantMenu = new frmRestaurantMenuList();
                    ShowNewForm(frmRestaurantMenu);
                    break;
                case "mnuMenuNorm":
                    frmRestaurantMenuNormList frmRestaurantMenuNorm = new frmRestaurantMenuNormList();
                    ShowNewForm(frmRestaurantMenuNorm);
                    break;
                default:
                    break;
            }
        }
    }
}
